/**
 * 用户相关请求模块
 */
import request from '@/utils/request.js'

export const getSearchSuggestion = params => request({
        method: 'GET',
        url:'/v1_0/suggestion',
        params,
})

export const getListSearch = params => request({
        method:'GET',
        url:'/v1_0/search',
        params,
})

export const getArticleById = articleId => request({
        method:'GET',
        url:`/v1_0/articles/${articleId}`,
})


export const addFollow = (target) => request({
        method:'POST',
        url:'/v1_0/user/followings',
        data:{
                target,
        }
})

export const deleteFollow = (target) => request({
        method:'DELETE',
        url:`/v1_0/user/followings/${target}`
})

